body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    background-color: #eef2f6;
    gap: 20px;
    padding: 20px;
    color: #333;
}

.chart-container {
    width: 90%;
    max-width: 900px;
    height: 500px;
    background-color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 20px;
    margin-top: 0;
}

.navbar {
    width: 100%;
    background-color: #2c3e50;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a {
    color: #f2f2f2;
    text-align: center;
    padding: 12px 10px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.5px;
    flex: 1;
    max-width: 150px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.navbar a:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

.navbar a.active {
    background-color: #6A9BEE;
    color: white;
    border-radius: 8px;
}

.navbar a.active:hover {
    background-color: #5883d3;
    transform: translateY(-2px);
}

.main-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.card {
    background-color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 30px;
    flex: 1 1 calc(33.33% - 25px);
    max-width: calc(33.33% - 25px);
    min-width: 300px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.card p {
    color: #666;
    font-size: 1em;
    line-height: 1.7;
}

.card a {
    display: block;
    background-color: #3498db;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.card a:hover {
    background-color: #2980b9;
}

/* 响应式设计 */

/* 中等屏幕设备 (例如平板电脑) */
@media (max-width: 1200px) {
    .main-content {
        max-width: 900px;
        /* 限制中等屏幕的最大宽度 */
    }

    .card {
        flex: 1 1 calc(50% - 20px);
        /* 每行显示2个 */
        max-width: calc(50% - 20px);
    }
}

/* 小屏幕设备 (例如手机) */
@media (max-width: 768px) {
    body {
        padding: 10px;
        /* 减少页面内边距 */
        gap: 10px;
        /* 减少卡片间距 */
    }

    .navbar {
        padding: 10px 0;
        /* 调整导航栏内边距 */
    }

    .navbar a {
        padding: 10px 15px;
        /* 调整导航链接内边距 */
        font-size: 0.9em;
        /* 减小字体大小 */
    }

    .main-content {
        max-width: 100%;
        /* 小屏幕上占据全部宽度 */
    }

    .card {
        flex: 1 1 100%;
        /* 每行显示1个 */
        max-width: 100%;
        min-width: unset;
        /* 取消最小宽度限制 */
        padding: 20px;
        /* 调整内边距 */
    }

    .card h3 {
        font-size: 1.3em;
        /* 标题稍小 */
    }

    .card p {
        font-size: 0.9em;
        /* 文字稍小 */
    }

    .card a {
        padding: 10px 15px;
        /* 按钮内边距 */
        font-size: 0.9em;
        /* 按钮字体稍小 */
    }

    .chart-container {
        width: 100%;
        /* 图表容器占据全部宽度 */
        height: 400px;
        /* 调整高度 */
        padding: 15px;
        /* 调整内边距 */
    }

    /* 如果导航栏链接太多，可以考虑垂直堆叠 */
    .navbar {
        display: flex;
        flex-direction: column;
        /* 垂直堆叠 */
        align-items: center;
        /* 居中对齐 */
    }

    .navbar a {
        width: 100%;
        /* 链接占据整行 */
        text-align: center;
        margin-bottom: 5px;
        /* 增加垂直间距 */
    }
}

.page-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.chart-header {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.chart-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.chart-description {
    color: #555;
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.table-container {
    width: 90%;
    max-width: 900px;
}

.chart-controls-placeholder {
    background-color: #f8f8f8;
    border: 1px dashed #ccc;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    text-align: center;
    color: #888;
    font-style: italic;
    margin-bottom: 20px;
}

/* Pagination Styles */
#table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 10px;
}

.pagination-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#table-pagination span {
    font-size: 1em;
    color: #555;
    padding: 0 10px;
}

.table-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    /* Add some space below the header */
}

/* Table Styles */
#suggestion-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    /* Ensures the border-radius is applied to the table corners */
}

#suggestion-table th,
#suggestion-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#suggestion-table thead th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
}

#suggestion-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#suggestion-table tbody tr:hover {
    background-color: #dbe4f0;
    cursor: default;
}

#suggestion-table tbody tr:last-child td {
    border-bottom: none;
}

.home-button-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.btn-home {
    display: inline-block;
    background-color: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-home:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* Filter Controls Styles */
.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* Spacing between filter elements */
    margin-top: 20px;
    padding: 10px;
}

.filters select,
.filters button {
    padding: 10px 15px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    height: 40px;
    /* Uniform height */
}

.filters select:hover,
.filters button:hover {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.filters button {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    border: none;
}

.filters button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Custom arrow for select dropdowns */
.filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px;
    padding-right: 40px;
    /* Make space for the arrow */
}

/* KPI Cards styling */
.kpi-cards-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.kpi-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-bottom: 3px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    flex: 1;
    min-width: 0;
    /* Allow shrinking */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-bottom-color: #3498db;
}

.kpi-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
    color: #666;
}

.kpi-card p {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #2980b9;
}